import request from '@/utils/request'

// 获取列表 /v1/edit_mod/list?page=1&rows=20
export const getList = (data) => {
  return request({
    url: '/v1/edit_mod/list',
    method: 'get',
    params: data
  })
}

// 单词查询 /v1/edit_mod/query_word?word=urlencode编码
export const queryWord = (data) => {
  return request({
    url: '/v1/edit_mod/query_word',
    method: 'get',
    params: data
  })
}

// 单词查询[id] /v1/edit_mod/query_word_id?word_id=单词ID
export const queryWordById = (data) => {
  return request({
    url: '/v1/edit_mod/query_word_id',
    method: 'get',
    params: data
  })
}

// 单词搜索 /v1/edit_mod/search?word=单词搜索
export const searchWord = (data) => {
  return request({
    url: '/v1/edit_mod/search',
    method: 'get',
    params: data
  })
}

// 单词添加 /v1/edit_mod/upsert
export const upsertWord = (data) => {
  return request({
    url: '/v1/edit_mod/upsert',
    method: 'post',
    data: data
  })
}

// 单词更新 /v1/edit_mod/update
export const updateWord = (data) => {
  return request({
    url: '/v1/edit_mod/update',
    method: 'post',
    data: data
  })
}

// 提交审核 /v1/edit_mod/update
export const submitWord = (data) => {
  return request({
    url: '/v1/edit_mod/update',
    method: 'post',
    data: data
  })
}

// 单词审核  /v1/audit_mod/word
export const auditWord = (data) => {
  return request({
    url: '/v1/audit_mod/word',
    method: 'get',
    params: data
  })
}

// 审核列表 /v1/audit_mod/list?type=0&page=1&rows=20
export const auditList = (data) => {
  return request({
    url: '/v1/audit_mod/list',
    method: 'get',
    params: data
  })
}

// 通过审核 /v1/edit_mod/update
export const passAudit = (data) => {
  return request({
    url: '/v1/edit_mod/update',
    method: 'post',
    data: data
  })
}
